#!/bin/bash
function android_build() {
  cmake \
  -DCMAKE_BUILD_TYPE=Debug \
  -DSOURCE_DIR=/opt/module/src/mp3lame/main \
  -DBINARY_DIR=/tmp/module/build/mp3lame/main \
  -DINSTALL_DIR=/tmp/module/install/mp3lame/main \
  -DSYSTEM_NAME=Android \
  -DPLATFORM=$2 \
  -DANDROID_ABI=$1 \
  -DNDK_ROOT=/mnt/android_home/ndk/android-ndk-r28c \
  -P /mnt/work/make/module_manager/master/cmake/module/configure/mp3lame.cmake
  if [ $? -ne 0 ]; then
    echo "❌ 构建失败"
    exit 1
  fi
  cd /tmp/module/build/mp3lame/main
  make -j$(nproc)
   make install
}

#android_build arm64-v8a 21
#android_build armeabi-v7a 21
#android_build x86_64 21
android_build x86 21




































